import axios from 'axios'
import type { user_detail } from '@/utils/types'

const register_api = {
  // 普通用户的注册
  async register(param_user_information: user_detail) {
    const response = await axios.post('/api/normal/account/register', {
      username: param_user_information.username,
      password: param_user_information.password,
      sex: param_user_information.sex,
      icon: param_user_information.icon,
      email: param_user_information.email,
      mobile: param_user_information.mobile,
      nick_name: param_user_information.nick_name,
      note: param_user_information.note,
      workType: param_user_information.workType,
      workplace: param_user_information.workplace,
      research: param_user_information.research,
    })

    return response.data
  },
}

export default register_api
